#ifndef SKILLTABLEPROXYMODEL_H
#define SKILLTABLEPROXYMODEL_H


#include <campaign.h>
#include <skill.h>
#include <characterclass.h>

#include <QAbstractTableModel>
#include <QPointer>


class SkillTableModel : public QAbstractTableModel
{
    Q_OBJECT

public:

    explicit SkillTableModel(QObject *parent = 0);

    void setCampaign(Campaign* campaign);

    virtual int rowCount(const QModelIndex &parent) const;
    virtual int columnCount(const QModelIndex &parent) const;

    virtual QVariant data(const QModelIndex &index, int role) const;
    virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;

    virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);

    virtual Qt::ItemFlags flags(const QModelIndex &index) const;

    bool ready() const;


private:

    QPointer<Campaign> m_campaign;
    QPointer<Skills> m_skills;
    QPointer<CharacterClasses> m_characterClasses;
    
};

#endif // SKILLTABLEPROXYMODEL_H
